package com.yykj.tencent.im.server.model.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserProfilePK implements Serializable {
    private String fromAccount;
    private String environment;

    @Override
    public boolean equals(Object obj) {
        if(obj == this) return true;
        if(obj == null || getClass() != obj.getClass()) return false;
        UserProfilePK fpk = (UserProfilePK)obj;
        return Objects.equals(fromAccount,fpk.fromAccount) &&
                Objects.equals(environment,fpk.environment);
    }

    @Override
    public int hashCode() {
        return Objects.hash(fromAccount,environment);
    }
}
